<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp" %>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>商品列表 - 景航电商</title>
		<%@ include file="/common/include/title.jsp" %>
	</head>
	<body>
		<%-- <%@ include file="/common/include/header.jsp" %> --%>
		<%-- 考虑一下,为啥要使用动态包含 --%>
		<jsp:include page="/header.htm"/>
		<div id="mainBody">
			<div class="container">
				<div class="row">
					<!-- Sidebar ================================================== -->
					<div id="sidebar" class="span3">
						<div class="well well-small">
							<a id="myCart" href="product_summary.html"><img
								src="themes/images/ico-cart.png" alt="cart">3 Items in your
								cart <span class="badge badge-warning pull-right">$155.00</span></a>
						</div>
						<ul id="sideManu" class="nav nav-tabs nav-stacked">
							<li class="subMenu open"><a> ELECTRONICS [230]</a>
								<ul>
									<li><a class="active" href="products.html"><i
											class="icon-chevron-right"></i>Cameras (100) </a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Computers, Tablets & laptop
											(30)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Mobile Phone (80)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Sound & Vision (15)</a></li>
								</ul></li>
							<li class="subMenu"><a> CLOTHES [840] </a>
								<ul style="display: none">
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Women's Clothing (45)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Women's Shoes (8)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Women's Hand Bags (5)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Men's Clothings (45)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Men's Shoes (6)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Kids Clothing (5)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Kids Shoes (3)</a></li>
								</ul></li>
							<li class="subMenu"><a>FOOD AND BEVERAGES [1000]</a>
								<ul style="display: none">
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Angoves (35)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Bouchard Aine & Fils (8)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>French Rabbit (5)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Louis Bernard (45)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>BIB Wine (Bag in Box) (8)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Other Liquors & Wine (5)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Garden (3)</a></li>
									<li><a href="products.html"><i
											class="icon-chevron-right"></i>Khao Shong (11)</a></li>
								</ul></li>
							<li><a href="products.html">HEALTH & BEAUTY [18]</a></li>
							<li><a href="products.html">SPORTS & LEISURE [58]</a></li>
							<li><a href="products.html">BOOKS & ENTERTAINMENTS [14]</a></li>
						</ul>
						<br />
						<div class="thumbnail">
							<img src="themes/images/products/panasonic.jpg"
								alt="Bootshop panasonoc New camera" />
							<div class="caption">
								<h5>Panasonic</h5>
								<h4 style="text-align: center">
									<a class="btn" href="product_details.html">
										<i class="icon-zoom-in"></i>
									</a>
									<a class="btn" href="#">
										Add to<i class="icon-shopping-cart"></i>
									</a>
									<a class="btn btn-primary" href="#">$222.00</a>
								</h4>
							</div>
						</div>
						<br />
						<div class="thumbnail">
							<img src="themes/images/products/kindle.png"
								title="Bootshop New Kindel" alt="Bootshop Kindel">
							<div class="caption">
								<h5>Kindle</h5>
								<h4 style="text-align: center">
									<a class="btn" href="product_details.html"> <i
										class="icon-zoom-in"></i></a> <a class="btn" href="#">Add to <i
										class="icon-shopping-cart"></i></a> <a class="btn btn-primary"
										href="#">$222.00</a>
								</h4>
							</div>
						</div>
						<br />
						<div class="thumbnail">
							<img src="themes/images/payment_methods.png"
								title="Bootshop Payment Methods" alt="Payments Methods">
							<div class="caption">
								<h5>Payment Methods</h5>
							</div>
						</div>
					</div>
					<!-- Sidebar end=============================================== -->
					<div class="span9">
						<ul class="breadcrumb">
							<li><a href="${rootPath }/main.htm">首页</a> <span class="divider">/</span></li>
							<li class="active">商品列表</li>
						</ul>
						<h3>
							商品列表
							<small class="pull-right"> 
								${requestScope.pageInfoUtil.totalRecord } products are available 
							</small>
						</h3>
						<hr class="soft" />
						<p>
							<%-- 如果是搜索某个分类下面的商品,要修改此段话 --%>
							Nowadays the lingerie industry is one of the most successful
							business spheres.We always stay in touch with the latest fashion
							tendencies - that is why our goods are so popular and we have a
							great number of faithful customers all over the country.
						</p>
						<hr class="soft" />
						<form class="form-horizontal span6">
							<div class="control-group">
								<label class="control-label alignL">Sort By </label> <select>
									<option>Priduct name A - Z</option>
									<option>Priduct name Z - A</option>
									<option>Priduct Stoke</option>
									<option>Price Lowest first</option>
								</select>
							</div>
						</form>
	
						<div id="myTab" class="pull-right">
							<a href="#listView" data-toggle="tab"><span
								class="btn btn-large"><i class="icon-list"></i></span></a> <a
								href="#blockView" data-toggle="tab"><span
								class="btn btn-large btn-primary"><i class="icon-th-large"></i></span></a>
						</div>
						<br class="clr" />
						<div class="tab-content">
							<div class="tab-pane" id="listView">
								<c:forEach items="${requestScope.goodsList }" var="goods" varStatus="stat">
									<div class="row">
										<div class="span2">
											<a href="${rootPath }/goods/${goods.url}.htm" target="_blank">
												<c:choose>
													<c:when test="${requestScope.goods.logoPath != null && requestScope.goods.logoPath != ''}">
														<img alt="" title="${goods.name }" src="${requestScope.webPath }${requestScope.goods.logoPath }" width="160" height="160">
													</c:when>
													<c:otherwise>
														<img alt="" title="这是车" src="${rootPath}/img/no_pic.png" width="160" height="160">
													</c:otherwise>
												</c:choose>
											</a>
										</div>
										<div class="span4">
											<h3><a href="${rootPath }/goods/${goods.url}.htm" target="_blank">${goods.name }</a></h3>
											<hr class="soft" />
											<h5>${goods.name }</h5>
											<p>
												这个是商品的简介,应该加上
											</p>
											<a class="btn btn-small pull-right" href="product_details.html">View Details</a>
											<br class="clr" />
										</div>
										<div class="span3 alignR">
											<form class="form-horizontal qtyFrm">
												<h3 style="text-decoration: line-through;font-size: 16px;color: red">市场价格:${goods.marketPrice }</h3>
												<h4>Y:${goods.price }</h4>
												<label class="checkbox"> <input type="checkbox">
													Adds product to compair
												</label>
												<br />
												<a href="${rootPath }/cartInsert.htm?goodsId=${goods.id}&num=1" target="_blank" class="btn btn-large btn-primary"> 
													添加购物车 <i class=" icon-shopping-cart"></i>
												</a>
												<a href="product_details.html" class="btn btn-large">
													<i class="icon-zoom-in"></i>
												</a>
											</form>
										</div>
									</div>
									<hr class="soft" />
								</c:forEach>
							</div>
	
							<div class="tab-pane  active" id="blockView">
								<ul class="thumbnails">
									<c:forEach items="${requestScope.goodsList }" var="goods" varStatus="stat">
										<li class="span3">
											<div class="thumbnail">
												<a href="${rootPath }/goods/${goods.url}.htm" target="_blank">
													<c:choose>
														<c:when test="${requestScope.goods.logoPath != null && requestScope.goods.logoPath != ''}">
															<img alt="" title="${goods.name }" src="${requestScope.webPath }${requestScope.goods.logoPath }" width="160" height="160">
														</c:when>
														<c:otherwise>
															<img alt="" title="这是车" src="${rootPath}/img/no_pic.png" width="160" height="160">
														</c:otherwise>
													</c:choose>
													<!-- <img src="themes/images/products/3.jpg" alt="" /> -->
												</a>
												<div class="caption">
													<h5><a href="${rootPath }/goods/${goods.url}.htm" target="_blank">${goods.name }</a></h5>
													<p>商品简介(应该加上)---${goods.goodsCate.name }</p>
													<p style="text-decoration: line-through;font-size: 16px;color: red">市场价格:${goods.marketPrice }</p>
													<h4 style="text-align: center">
														<!-- <a class="btn" href="product_details.html"> 
															<i class="icon-zoom-in"></i>
														</a> -->
														<a class="btn" href="${rootPath }/cartInsert.htm?goodsId=${goods.id}&num=1" target="_blank">
															添加购物车 <i class="icon-shopping-cart"></i>
														</a>
														<a class="btn btn-primary" href="#">Y:${goods.price }</a>
													</h4>
												</div>
											</div>
										</li>
									</c:forEach>
								</ul>
								<hr class="soft" />
							</div>
						</div>
	
						<a href="compair.html" class="btn btn-large pull-right">Compair Product</a>
						<%--
							分页总为分为以下几种情况
							1 2 3 .... 10
							1... 4 5 6 7 8 9...10
							1...8 9 10
						 --%>
						<div class="pagination">
							<ul>
								<c:set value="3" var="pageInfoScope"/>
								<c:choose>
									<c:when test="${requestScope.pageInfoUtil.currentPage < pageInfoScope}">
										<%-- 1 2 3 .... 10 --%>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.prePage }">&lsaquo;</a></li>
										<%--
											for(int ftemp = 1 ; ftemp < pageInfoScope ; ftemp ++
											{
												System.out.println(ftemp);
											}
										 --%>
										<c:forEach begin="1" end="${pageInfoScope}" step="1" var="ftemp">
											<li><a href="${rootPath}/goods.htm?currentPage=${ftemp}&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}" class="${requestScope.pageInfoUtil.currentPage == ftemp ? 'btn btn-primary' : '' }">${ftemp}</a></li>
										</c:forEach>
										<li><a href="#">...</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.totalPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == requestScope.pageInfoUtil.totalPage ? 'btn btn-primary' : '' }">${requestScope.pageInfoUtil.totalPage }</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.nextPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}">&rsaquo;</a></li>
									</c:when>
									<c:when test="${requestScope.pageInfoUtil.currentPage <= requestScope.pageInfoUtil.totalPage && requestScope.pageInfoUtil.currentPage >= requestScope.pageInfoUtil.totalPage - pageInfoScope}">
										<%-- 1...8 9 10 --%>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.prePage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}">&lsaquo;</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=1&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == 1 ? 'btn btn-primary' : '' }">1</a></li>
										<li><a href="#">...</a></li>
										<c:forEach begin="${requestScope.pageInfoUtil.totalPage - pageInfoScope}" end="${requestScope.pageInfoUtil.totalPage - 1}" step="1" var="ftemp">
											<li><a href="${rootPath}/goods.htm?currentPage=${ftemp}&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == ftemp ? 'btn btn-primary' : '' }">${ftemp}</a></li>
										</c:forEach>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.totalPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == requestScope.pageInfoUtil.totalPage ? 'btn btn-primary' : '' }">${requestScope.pageInfoUtil.totalPage }</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.nextPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}">&rsaquo;</a></li>
									</c:when>
									<c:otherwise>
										<%-- 1... 4 5 6 ...10 --%>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.prePage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}">&lsaquo;</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=1&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == 1 ? 'btn btn-primary' : '' }">1</a></li>
										<li><a href="#">...</a></li>
										<c:forEach begin="${requestScope.pageInfoUtil.currentPage}" end="${requestScope.pageInfoUtil.currentPage + pageInfoScope}" step="1" var="ftemp">
											<li><a href="${rootPath}/goods.htm?currentPage=${ftemp}&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}"  class="${requestScope.pageInfoUtil.currentPage == ftemp ? 'btn btn-primary' : '' }">${ftemp}</a></li>
										</c:forEach>
										<li><a href="#">...</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.totalPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}" class="${requestScope.pageInfoUtil.currentPage == requestScope.pageInfoUtil.totalPage ? 'btn btn-primary' : '' }">${requestScope.pageInfoUtil.totalPage }</a></li>
										<li><a href="${rootPath}/goods.htm?currentPage=${requestScope.pageInfoUtil.nextPage }&keyword=${requestScope.keyword}&cateId=${requestScope.cateId}">&rsaquo;</a></li>
									</c:otherwise>
								</c:choose>
								第${requestScope.pageInfoUtil.currentPage}页
								<%-- ${requestScope.pageInfoUtil.totalPage }-----> --%>
								<!-- <li><a href="#">&lsaquo;</a></li>
								<li><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">...</a></li>
								<li><a href="#">&rsaquo;</a></li> -->
							</ul>
						</div>
						<br class="clr" />
					</div>
				</div>
			</div>
		</div>
		<!-- MainBody End ============================= -->
		<%@ include file="/common/include/footer.jsp" %>
	</body>
</html>